home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #6 / Amiga Plus CD - 2004 - No. 06.iso / AmigaPlus / Tools / mOS_Pegasos / Trailermaker < prev    next >
Text File  |  2004-05-11  |  5KB  |  185 lines

  1.  
  2.  
  3. /* Testoberfläche*/
  4.    
  5. IF ~SHOW('LIBRARIES','tritonrexx.library') THEN DO
  6.    IF ~ADDLIB('tritonrexx.library',10,-30,0) THEN DO
  7.       SAY 'Kann die <tritonrexx.library> nicht öffnen!'
  8.       EXIT(10)
  9.    END
  10. END
  11. IF ~SHOW('LIBRARIES','rexxtricks.library') THEN DO
  12.    IF ~ADDLIB('rexxtricks.library',10,-30,0) THEN DO
  13.       SAY 'Kann die <rexxtricks.library> nicht öffnen!'
  14.       EXIT(10)
  15.    END
  16. END
  17. projektladen = Loadfile("DIVX-5 File",ok,"Ram:","DVD.avi")
  18. id=0
  19. lan.0 = 4
  20. lan.1 = 'german'
  21. lan.2 = 'english'
  22. lan.3 = 'french'
  23. lan.4 = 'turky'
  24. as.0=2
  25. as.1='4:3'
  26. as.2='16:9'
  27. an.0=4
  28. an.1=1
  29. an.2=2
  30. an.3=3
  31. an.4=4
  32. call ReadFile("envarc:DVD-device",device)
  33. call ReadFile("envarc:DVD-unit",unit)
  34. windowtags =   WindowID(1),
  35.                WindowTitle('DVD-Decoder'),
  36.                QuickHelpOn(0),
  37.                vertgroupa,
  38.                   Horizgroupa,
  39.                   vertgroupa,
  40.                   centeredtext(''),
  41.                   Button('Decode',104),
  42.                   endgroup,
  43.                   space,
  44.                   vertgroupa,
  45.                   centeredText('Titel'),
  46.                   StringGadget('1',103),
  47.                   endgroup,
  48.                   space,
  49.                   vertgroupa,
  50.                   centeredText('Chapter'),
  51.                   StringGadget('1',105),
  52.                   endgroup,
  53.                   endgroup,
  54.                   space,
  55.                   horizgroupc,
  56. vertgroupa,
  57.                   centeredText('               Trailerfile           '),
  58.                   StringGadget('Ram:DVD.avi',107),
  59.                   endgroup,
  60.                   vertgroupa,
  61.                   Textn(''),
  62.                   Getfilebutton(106),
  63.                   endgroup,
  64.                   spaceb,
  65.                   vertgroupa,
  66.                   centeredText('max. Decoding-Time'),
  67.                   Stringgadget('00:00:10',108),
  68.                   endgroup,
  69.                   space,
  70.                   vertgroupa,
  71.                   centeredText('Frame-Size'),
  72.                   Stringgadget('640x480',109),
  73.                   endgroup,
  74.                   space,
  75.                   vertgroupa,
  76.                   centeredText('Frame-Quality'),
  77.                   Stringgadget('8',110),
  78.                   endgroup,
  79.                   endgroup,
  80.                   space,
  81.                   horizgroupa,
  82.                   vertgroupa,
  83.                   centeredText('Audio-Language'),
  84.                   CycleGadget(Lan,0,111),
  85.                   endgroup,
  86.                   space,
  87.                   vertgroupa,
  88.                   centeredText('DVD-Angle'),
  89.                   CycleGadget(an,0,113),
  90.                   endgroup,
  91.                   space,
  92.                   vertgroupa,
  93.                   centeredText('Frame-Aspect'),
  94.                   CycleGadget(as,0,112),
  95.                   endgroup,
  96.                   endgroup,
  97.                   endgroup
  98.                           
  99. app = TR_CREATEAPP('TRCA_Name Dia-CD')
  100.  
  101. IF app ~= '00000000'x THEN DO
  102.  
  103.    window = TR_OPENPROJECT(app,windowtags)
  104.  
  105.    IF window ~= '00000000'x THEN DO
  106.       ende = 0
  107.       DO WHILE ende ~= 1
  108.          CALL TR_WAIT(app,'')
  109.  
  110.          DO WHILE TR_HANDLEMSG(app,'event')
  111.             IF event.trm_class = 'TRMS_ACTION' THEN DO
  112.                SELECT
  113.                   WHEN event.trm_id = 13 THEN
  114.                     ende = 1
  115.  
  116.                   WHEN event.trm_id = 2 THEN
  117.                      nop
  118.  
  119.                   OTHERWISE
  120.                      NOP
  121.                END
  122.  
  123.  
  124. if event.trm_id = 104 then do
  125. titel=TR_GetAttribute(window,103,'Trob_String')
  126. chapter=TR_GetAttribute(window,105,'Trob_String')
  127. Outputfile='"'||TR_GetAttribute(window,107,'Trob_String')||'"'
  128. decodingtime=TR_GetAttribute(window,108,'Trob_String')
  129. framesize=TR_GetAttribute(window,109,'Trob_String')
  130. framequality=TR_GetAttribute(window,110,'Trob_String')
  131. lang=TR_GetAttribute(window,111,'Trat_Value')
  132. asp=TR_GetAttribute(window,112,'Trat_Value')
  133. ann=TR_GetAttribute(window,113,'Trat_Value')+1
  134. if lang=0 then do
  135. ll=' -alang de '
  136. end
  137. if lang=1 then do
  138. ll=' -alang en '
  139. end
  140. if lang=2 then do
  141. ll=' -alang fr '
  142. end
  143. if lang=3 then do
  144. ll=' -alang tr '
  145. end
  146. if asp=0 then do
  147. aas='4:3'
  148. end
  149. if asp=1 then do
  150. aas='16:9'
  151. end
  152. decode='MOSSYS:c/mencoder -dvd '||titel||' -dvd-device '||device.1||':'||unit.1||' -dvdangle '||ann||' -chapter '||chapter||ll||' -vop scale='||framesize||' -endpos '||decodingtime||' -o '||Outputfile||' -ovc lavc -lavcopts vcodec=mpeg4:vqscale='||framequality||' -oac mp3lame vbr=0:q=5:aq=0:ratio=5:vol=0 -aspect '||aas
  153. address command decode
  154. end
  155.  
  156. if event.trm_id = 106 then do
  157. call ASL_RequestFile(window,divx,projektladen)
  158. call TR_SetAttribute(window,107,'Trob_String',divx.1)
  159. end
  160.  
  161.   
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  END
  171.  
  172.             IF event.trm_class = 'TRMS_CLOSEWINDOW' THEN
  173.                ende = 1
  174.          END
  175.       END
  176.  
  177.       CALL TR_CLOSEPROJECT(window)
  178.    END
  179.  
  180.    CALL TR_DELETEAPP(app)
  181. END
  182.  
  183. EXIT(0)
  184.  
  185.